package cz.muni.fi.pa165.creatures.ejb.services;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import cz.muni.fi.pa165.creatures.ejb.dao.CreatureDAOLocal;
import cz.muni.fi.pa165.creatures.ejb.model.Creature;

/**
 * @author xvojtis2
 */
@Stateless
public class CreatureService implements CreatureServiceLocal {

    @EJB
    private CreatureDAOLocal creatureDao;

    @Override
    public void create(Creature creature) {
        creatureDao.create(creature);
    }

    @Override
    public void remove(Creature creature) {
        creatureDao.remove(creature);
    }

    @Override
    public void update(Creature creature) {
        creatureDao.update(creature);
    }

    @Override
    public Creature get(Long id) {
        return creatureDao.get(id);
    }

    @Override
    public Long getCount() {
        return creatureDao.getCount();
    }

    @Override
    public List<Creature> getAll() {
        return creatureDao.getAll();
    }

    @Override
    public Creature getByName(String name) {
        return creatureDao.getByName(name);
    }
}
